package com.gang.Controller;

import com.gang.Service.DemoService;
import mvcframework.annotation.GygAutowired;
import mvcframework.annotation.GygController;
import mvcframework.annotation.GygRequestMapping;
import mvcframework.annotation.GygRequestParam;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author gyg
 * @version 1.0
 * @date 2020/8/27 17:17
 * @Description:
 */
@GygController
@GygRequestMapping("/demo")
public class DemoController {

    @GygAutowired
    private DemoService demoService;


    @GygRequestMapping("getName")
    public void getName(@GygRequestParam("name") String name, HttpServletRequest request, HttpServletResponse response) throws Exception{

        String allName = demoService.getName(name);
        response.getWriter().write(allName);
    }

}
